﻿using Abp.Application.Navigation;
using Abp.Application.Services;
using Abp.Runtime.Session;
using System.Collections.Generic;

namespace Teleware.Newbe.Navigation.Web.AppServices.Impl
{
    public class MenuService : ApplicationService, IMenuService
    {
        private readonly IUserNavigationManager _userNavigationManager;

        public MenuService(IUserNavigationManager userNavigationManager)
        {
            _userNavigationManager = userNavigationManager;
        }

        public IEnumerable<UserMenu> GetUserMenus()
        {
            return _userNavigationManager.GetMenusAsync(AbpSession.ToUserIdentifier()).Result;
        }
    }
}
